

from util.selenium.webdriver.common.by import By
from base.BaseMethod import BM

class IARiprIec():

    form_btn_loc = (By.LINK_TEXT, '知识产权对企业竞争力的作用')
    ripr_iec_loc = (By.CSS_SELECTOR, 'textarea#Zscqjz')
    save_btn_loc = (By.CSS_SELECTOR, 'button#dataEprCycxSave')
    def __init__(self, driver=None, text=''):

        self.driver = driver
        self.text = text
    def fill_form(self):
        BM.click(driver=self.driver, ele_loc=self.form_btn_loc)
        BM.wait(driver=self.driver, ele_loc=self.ripr_iec_loc)
        BM.input(driver=self.driver, ele_loc=self.ripr_iec_loc, keys=self.text)

        BM.global_click_btn(btn_loc=self.save_btn_loc, driver=self.driver)

